home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / mac / Illustrator 6.0 SDK r1 Mac / AI Plugin Interface / AIRaster.h < prev    next >
Text File  |  1995-12-21  |  4KB  |  183 lines

  1. /**
  2.  
  3.     AIRaster.h
  4.     Copyright (c) 1995 Adobe Systems Incorporated.
  5.     All Rights Reserved
  6.  
  7.     Adobe Illustrator 6.0 Raster Object Suite.
  8.  
  9.  **/
  10.  
  11. #ifndef __AIRaster__
  12. #define __AIRaster__
  13.  
  14.  
  15. /*******************************************************************************
  16.  **
  17.  **    Imports
  18.  **
  19.  **/
  20.  
  21. #include "AITypes.h"
  22. #include "AIArt.h"
  23. #include "AIFixedMath.h"
  24.  
  25.  
  26. #if Macintosh
  27.     #ifdef __cplusplus
  28.     extern "C" {
  29.     #endif
  30.     
  31.     #if PRAGMA_ALIGN_SUPPORTED
  32.     #pragma options align=mac68k
  33.     #endif
  34.     
  35.     #if PRAGMA_IMPORT_SUPPORTED
  36.     #pragma import on
  37.     #endif
  38. #endif
  39.  
  40.  
  41. /*******************************************************************************
  42.  **
  43.  **    Constants
  44.  **
  45.  **/
  46.  
  47. #define kAIRasterSuite        "AI Raster Suite"
  48. #define kAIRasterVersion    2
  49.  
  50.  
  51.  
  52. #define kRasterMaskImageType        0x0002
  53. #define kRasterInvertBits            0x0004        // invert 1-bit image or mask
  54.  
  55.  
  56. #define kMaxChannels  16
  57.  
  58. #define kGrayColorSpace        0
  59. #define kRGBColorSpace        1
  60. #define kCMYKColorSpace        2
  61.  
  62. // error codes 
  63. #define kRasterTypeNotSupportedErr            'RTYP'
  64. #define kRasterSpecifiedErr                    'RSPE'        // raster has already been specified
  65. #define kRasterBitsPerPixelsNotSupportedErr    'RBIT'        // raster bits per pixel not supported
  66.  
  67.  
  68. /*******************************************************************************
  69.  **
  70.  **    Types
  71.  **
  72.  **/
  73.  
  74. typedef    signed char        int8;
  75. typedef unsigned char    uint8;
  76. typedef    signed short    int16;
  77. typedef unsigned short    uint16;
  78. typedef signed long        int32;
  79. typedef unsigned long    uint32;
  80.  
  81.  
  82. typedef struct {
  83.  
  84.     long top, left, bottom, right, front, back;
  85.  
  86. } Slice;
  87.  
  88.  
  89. typedef struct {
  90.  
  91.     void        *data;
  92.     Slice        bounds;
  93.     long        rowBytes;
  94.     long        colBytes;
  95.     long        planeBytes;
  96.     short        channelInterleave[kMaxChannels];
  97.  
  98. } Tile;
  99.  
  100.  
  101. /*
  102.  *
  103.  *        The two different kinds of color tables supported (rgb and cmyk).
  104.  *
  105.  */
  106.  
  107. typedef struct _t_AIRGBColorRec    {
  108.     uint8    mustBeZero;        /* MUST BE ZERO!!!! */
  109.     uint8    red;
  110.     uint8    green;
  111.     uint8    blue;
  112. } AIRGBColorRec;
  113.  
  114. typedef struct _t_AIExtendedRGBColorRec {
  115.     uint16    mustBeZero;        /* MUST BE ZERO!!!! */
  116.     uint16    red;
  117.     uint16    green;
  118.     uint16    blue;
  119. } AIExtendedRGBColorRec;
  120.  
  121. typedef struct _t_AICMYKColorRec    {
  122.     uint8    cyan;
  123.     uint8    magenta;
  124.     uint8    yellow;
  125.     uint8    black;
  126. } AICMYKColorRec;
  127.  
  128.  
  129. typedef struct _t_AIRasterRecord    {
  130.     uint16            flags;
  131.     Rect            bounds;
  132.     int32            byteWidth;
  133.     int16            colorSpace;
  134.     int16            bitsPerPixel;
  135. } AIRasterRecord;
  136.  
  137.  
  138. #if Macintosh
  139. typedef FSSpec PlatformRasterFileSpecification;
  140. #endif
  141.  
  142.  
  143. /*******************************************************************************
  144.  **
  145.  **    Suite
  146.  **
  147.  **/
  148.  
  149. typedef struct {
  150.  
  151.     MACPASCAL FXErr (*GetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info );
  152.     MACPASCAL FXErr (*SetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info );
  153.     MACPASCAL FXErr (*GetRasterFileSpecification) ( AIArtHandle raster,
  154.                 PlatformRasterFileSpecification *file );
  155.     MACPASCAL FXErr (*SetRasterFileSpecification) ( AIArtHandle raster,
  156.                 PlatformRasterFileSpecification *file );
  157.     MACPASCAL FXErr (*GetRasterMatrix) ( AIArtHandle raster, FixedMatrix *matrix );
  158.     MACPASCAL FXErr (*SetRasterMatrix) ( AIArtHandle raster, FixedMatrix *matrix );
  159.     MACPASCAL FXErr (*GetRasterBoundingBox) ( AIArtHandle raster, FixedRect *bbox );
  160.     MACPASCAL FXErr (*SetRasterBoundingBox) ( AIArtHandle raster, FixedRect *bbox );
  161.     MACPASCAL FXErr (*GetRasterTile) ( AIArtHandle raster, Slice *artSlice, Tile *workTile, Slice *workSlice );
  162.     MACPASCAL FXErr (*SetRasterTile) ( AIArtHandle raster, Slice *artSlice, Tile *workTile, Slice *workSlice );
  163.  
  164. } AIRasterSuite;
  165.  
  166.  
  167. #if Macintosh
  168.     #if PRAGMA_IMPORT_SUPPORTED
  169.     #pragma import off
  170.     #endif
  171.     
  172.     #if PRAGMA_ALIGN_SUPPORTED
  173.     #pragma options align=reset
  174.     #endif
  175.     
  176.     #ifdef __cplusplus
  177.     }
  178.     #endif
  179. #endif
  180.  
  181.  
  182. #endif
  183.